<script lang="ts" setup>
import { safeArea } from '@/libs/config'
// import { imagePath } from '@/libs/file-utils'
import { back } from '@/libs/common'

let top = safeArea.top + 'rpx'
// #ifdef MP
top = safeArea.top2 - 80 + 'rpx'
// #endif

// const icon_back = imagePath('icon-back.svg')
</script>

<template>
  <div
    class="back-button"
    @click="back"
  >
    <div class="icon"></div>
    返回
  </div>
</template>

<style lang="less" scoped>
.back-button {
  position: absolute;
  left: 20rpx;
  top: v-bind(top);
  height: 100rpx;
  padding: 0 20rpx;

  display: flex;
  align-items: center;

  font-size: 32rpx;
  font-weight: bold;

  z-index: 100;

  .icon {
    width: 34rpx;
    height: 34rpx;

    background-size: 100% 100%;
  }
}
</style>